import React from 'react';
import {View, Text, ScrollView} from 'react-native';
import {useNavigation} from '@react-navigation/native';
import {HeaderTitle} from '@react-navigation/elements';
import {useMount} from 'ahooks';

import HeaderStyle2 from '@/components/HeaderStyle2';
import ToggleDrawer from '../../ToggleDrawer';

const rPPath = 'OPlayer';
export default ({leftNavIsOpen, setLeftNavIsOpen, pageName}) => {
  const toggleDrawerProps = {leftNavIsOpen, setLeftNavIsOpen};
  const navigation = useNavigation();

  return (
    <View
      style={{
        flex: 1,
      }}>
      <View style={{flex: 1, padding: 0}}>
        <HeaderStyle2>
          <ToggleDrawer {...toggleDrawerProps} />
          <HeaderTitle>{pageName}</HeaderTitle>
        </HeaderStyle2>
        <ScrollView style={{flex: 1}}>
          <Text>{pageName}</Text>
        </ScrollView>
      </View>
    </View>
  );
};
